﻿using Microsoft.Media.ISO;
using System;
using Windows.UI.Xaml.Data;

namespace Microsoft.Media.ISOProfiler.Converters
{
    public sealed class BoxToTextConverter : IValueConverter
    {
#if SILVERLIGHT
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
#else
        public object Convert(object value, Type targetType, object parameter, string language)
#endif
        {
            var box = value as IBox;
            if (value != null)
            {
                return box.Type;
            }
            return string.Empty;
        }

#if SILVERLIGHT
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
#else
        public object ConvertBack(object value, Type targetType, object parameter, string language)
#endif
        {
            throw new NotImplementedException();
        }
    }
}
